﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CRUD
{
    public class Factory
    {
        public static IDS p = null;
        static Factory() 
        {
            add(new DS_csv());          
            add(new DS_DB());
            add(new DS_NET());
        }
        static void add(IDS x)
        {
            x.next = p;
            p = x;
           
        }
        public static IDS gi(string name)
        {
            return p.IsReady(name);
        }
        public static Person CreateObject(string name)
        {                     
            return new Person();
        }
    }
}
